﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace IceScream.Models
{
    public partial class Admin
    {
        public string RePassword
        {
            get;
            set;
        }

        private List<ObjectRoll> lst;

        public List<ObjectRoll> ListRoll
        {
            get
            {
                lst = new List<ObjectRoll>();

                ObjectRoll ro1 = new ObjectRoll { Id = 1, RollName = "Manager" };
                ObjectRoll ro2 = new ObjectRoll { Id = 2, RollName = "Admin" };

                lst.Add(ro1);
                lst.Add(ro2);

                return lst;
            }
        }

        public string RollName
        {
            get 
            {
                if (Roll.HasValue)
                {
                    if (Roll == 1)
                    {
                        return "Manager";
                    }
                    else if (Roll == 2)
                    {
                        return "Admin";
                    }

                }
                return string.Empty;
            }
        }
    }
}